<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>Ant Design Vue</title>
    <link rel="icon" type="image/x-icon" href="https://qn.antdv.com/favicon.ico" />
    <style>
      #page-404 {
        width: 222px;
        height: 120px;
        position: fixed;
        font-size: 120px;
        line-height: 120px;
        margin: -111px -60px;
      }
    </style>
  </head>

  <body>
    <div id="page-404">
      <b>404</b>
    </div>
    <script>
      (function() {
        let dom = document.querySelector('#page-404');

        let top = 0;
        let left = 0;

        let step = 10;

        let topInterval = parseInt(step * Math.random());
        let leftInterval = parseInt(step * Math.random());

        function running404() {
          dom.style.color = `#${parseInt(0xffffff * Math.random()).toString(16)}`;

          top += topInterval;
          left += leftInterval;

          if (top <= 0) {
            top = 0;
            topInterval = parseInt(step * Math.random());
          }
          if (top >= 100) {
            top = 100;
            topInterval = -parseInt(step * Math.random());
          }
          if (left <= 0) {
            left = 0;
            leftInterval = parseInt(step * Math.random());
          }
          if (left >= 100) {
            left = 100;
            leftInterval = -parseInt(step * Math.random());
          }

          console.log(top);
          console.log(left);

          dom.style.top = `${top}vh`;
          dom.style.left = `${left}vw`;

          // dom.style.transform = `
          //   rotate3d(${Math.random()}, ${Math.random()}, ${Math.random()}, ${Math.random() * 360}deg)
          //   scale3d(${Math.random()}, ${Math.random()}, ${Math.random()})
          // `;

          window.requestAnimationFrame(running404);
        }
        window.requestAnimationFrame(running404);
      })();
    </script>
  </body>
</html>
